import request from '@/utils/request'

// 查询奖励活动列表
export function listActivity(query) {
    return request({
        url: '/award/activity/list',
        method: 'get',
        params: query
    })
}

// 查询奖励活动详细
export function getActivity(id) {
    return request({
        url: '/award/activity/' + id,
        method: 'get'
    })
}

// 新增奖励活动
export function addActivity(data) {
    return request({
        url: '/award/activity',
        method: 'post',
        data: data
    })
}

// 修改奖励活动
export function updateActivity(data) {
    return request({
        url: '/award/activity',
        method: 'put',
        data: data
    })
}

// 启/停奖励活动
export function startAndStop(data) {
    return request({
        url: '/award/activity/startAndStop',
        method: 'put',
        data: data
    })
}

// 删除奖励活动
export function delActivity(id) {
    return request({
        url: '/award/activity/' + id,
        method: 'delete'
    })
}

// 导出奖励活动
export function exportActivity(query) {
    return request({
        url: '/award/activity/export',
        method: 'get',
        params: query
    })
}
